class Cat:
    def __init__(self, name):
        self.name = name
        self.hp = 100
        self.ap = 1

    def say(self):
        print(f"猫名：{self.name},hp:{self.hp},ap:{self.ap}")

    def beat(self, obj):
        obj.hp -= self.ap
        print(f"猫{self.name}攻击了狗{obj.name},狗的剩余生命值：{obj.hp}")


class Dog:
    def __init__(self, name):
        self.name = name
        self.hp = 100
        self.ap = 2

    def say(self):
        print(f"狗名：{self.name},hp:{self.hp},ap:{self.ap}")

    def beat(self, obj):
        obj.hp -= self.ap
        print(f"狗{self.name}攻击了猫{obj.name},猫的剩余生命值：{obj.hp}")

class CatBeatDog:
    def __init__(self):
        c1 = Cat("橘座")
        d1 = Dog("克鲁比")

